# -*- coding: utf-8 -*-
"""
@Time ： 2024/11/28 下午9:04
@Author ：楚地仁人
@File ：milvus.py
@IDE ：PyCharm

"""

from pymilvus import MilvusClient

client = MilvusClient(uri="http://122.51.212.243:19530")


def list_collections():
    return client.list_collections()


def drop_collection(collection_name):
    return client.drop_collection(collection_name=collection_name)


if __name__ == '__main__':
    results = list_collections()
    for result in results:
        drop_collection(result)
    print(list_collections())
